#include<stdio.h>

int main (void)
{
	int i,n,flag;
	double sum,item,denominator,numerator;
	
	printf("Enter n:");
	scanf("%d",&n);
	
	flag = 1;
	denominator = 1.0;
	sum = 0;
	numerator = 1.0;
	
	for (i=1;i<=n;i++)
	{
		item = flag*numerator/denominator;
		sum = sum + item;
		flag = -flag;
		numerator = numerator + 1;
		denominator = denominator + 2;
		
		
		
	}
	
	printf("sum=%.3f",sum);
	
	return 0;
}
